<template>
  <div class="mask">
    <div class="box">
      <div class="box-title">
        <span>温馨提示</span>
        <CloseOutlined
          style="font-size: 20px; color: #c2c2c2; cursor: pointer"
          @click="onCancel()"
        />
      </div>
      <div class="box-content">
        <ExclamationCircleOutlined style="font-size: 20px; color: @color-test" />
        <span>是否确认删除所选项？</span>
      </div>
      <div class="box-btns">
        <a-button style="margin: 0 16px 0 0" @click="onCancel()">取消</a-button>
        <a-button type="primary" html-type="submit" @click="onOk()">确定</a-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { CloseOutlined, ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { defineEmits } from 'vue';

const emit = defineEmits(['onCancelDel', 'onOk']);
const onCancel = () => {
  console.log(111);
  emit('onCancelDel');
};
const onOk = () => {
  console.log(222);
  emit('onOk');
};
</script>

<style lang="less" scoped>
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  .box {
    width: 328px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 24px;
    &-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 18px;
      font-family: Source Han Sans CN, Source Han Sans CN-Medium;
      font-weight: 500;
      color: #222222;
    }
    &-content {
      display: flex;
      align-items: center;
      font-size: 16px;
      font-family: Source Han Sans CN, Source Han Sans CN-Regular;
      color: #666666;
      background: #f8f8f8;
      border-radius: 4px;
      padding: 14px 16px;
      margin-top: 16px;
    }
    &-btns {
      display: flex;
      justify-content: flex-end;
      margin-top: 24px;
    }
  }
}
</style>
